{{define "widget/checkbox"}}
{{$values := Split .Value .Separator}}
{{ range $key,$val := .FromData}}
{{$v := InArray $key $values}}
<input type="checkbox"
       class="{{if $.Disabled}}layui-disabled{{end}} {{$.CssClass}}"
       style="{{.CssStyle}}"
       id="{{$.Name}}_{{$key}}"
       name="{{$.Name}}"
       title=" {{$val.__mc_value}}"
       value="{{$key}}" {{if $v}}checked{{end}}{{if $.Disabled}} disabled {{end}}
/>
{{end}}
{{end}}